﻿using ERP.ERPSystem.ProductionSystem.Dto;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;

namespace ERP.ERPSystem.ProductionSystem
{
    /// <summary>
    /// 工艺路线服务接口
    /// </summary>
    public interface IWorkmanshipService : IApplicationService
    {
        /// <summary>
        /// 根据ID获取单个工艺流程
        /// </summary>
        /// <param name="id">工艺流程的唯一标识 (ID)</param>
        /// <returns>返回找到的工艺流程DTO</returns>
        Task<WorkmanshipDTO> GetAsync(int id);

        /// <summary>
        /// 获取分页的工艺流程列表
        /// </summary>
        /// <param name="input">包含筛选和分页参数的输入DTO</param>
        /// <returns>返回工艺流程的分页列表</returns>
        Task<PagedResultDto<WorkmanshipDTO>> GetListAsync(GetWorkmanshipInputDto input);

        /// <summary>
        /// 创建一个新的工艺流程
        /// </summary>
        /// <param name="input">用于创建工艺流程的DTO</param>
        /// <returns>返回新创建的工艺流程DTO</returns>
        Task<WorkmanshipDTO> CreateAsync(CreateUpdateWorkmanshipDto input);

        /// <summary>
        /// 更新一个已存在的工艺流程
        /// </summary>
        /// <param name="id">要更新的工艺流程ID</param>
        /// <param name="input">包含新数据的DTO</param>
        /// <returns>返回更新后的工艺流程DTO</returns>
        Task<WorkmanshipDTO> UpdateAsync(int id, CreateUpdateWorkmanshipDto input);

        /// <summary>
        /// 根据ID删除一个工艺流程
        /// </summary>
        /// <param name="id">要删除的工艺流程ID</param>
        Task DeleteAsync(int id);
        
        /// <summary>
        /// 批量删除工艺流程
        /// </summary>
        /// <param name="ids">要删除的工艺流程ID集合</param>
        Task DeleteManyAsync(IEnumerable<int> ids);
    }
}
